import request from '@/utils/request'
import qs from 'qs'

//说说列表查询
export const talkListService = (params: any) =>{
    return request.get('/talkManagement/page',{params:params})
}
//添加说说
export const addTalkService = (talkForm: any)=>{
    return request.post('/talkManagement',talkForm)
}
//修改说说
export const updateTalkService = (talkForm: any)=>{
    return request.put('/talkManagement',talkForm)
}
//删除说说
export const deleteTalkService = (id: number)=>{
    return request.delete('/talkManagement/'+id)
}
//批量删除说说
export const deleteBatchTalkService = (params: any)=>{
    //qs库转换数组格式
    //{arrayFormat: 'repeat'}为：?ids=1&ids=2
    return request.delete('/talkManagement',{params:params ,paramsSerializer: function(params){
        return qs.stringify(params,{arrayFormat: 'repeat'})
    }})
}
//用户查询说说列表集合
export const selectTalkListService = () =>{
    return request.get('/talkManagement/user/select')
}